Methods for controlling a main clock source shared between different wireless communications modules and apparatuses using the same

ABSTRACT

A communications apparatus is provided. A first wireless communications module provides a first wireless communications service and communicates with a first communications device in compliance with a first protocol. A second wireless communications module provides a second wireless communications service and communicates with a second communications device in compliance with a second protocol. A clock source is shared by the first and the second communications modules and provides a reference clock to the first and the second communications modules. The first wireless communications module detects a request from the second wireless communications module for activating the clock source, determines whether the reference clock has been stably generated by the clock source, and adjusts an electrical characteristic of the clock source to facilitate the reference clock output from the clock source to achieve a target frequency when the reference clock has not been stably generated.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.61/246,564 filed Sep. 29, 2009, and entitled “Methods for controlling amain clock source shared between different wireless communicationsmodules and apparatuses using the same”. The entire contents of whichare hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates to a method and an apparatus for controlling amain clock source, and more particularly to a method and an apparatusfor controlling a main clock source shared between different wirelesscommunications modules in a coordinated manner.

2. Description of the Related Art

With the development of wireless communications technology, mobileelectronic devices may be provided with more than one wirelesscommunications service, such as Bluetooth, Wireless Fidelity (WiFi),Worldwide Interoperability for Microwave Access (WiMAX) wirelesscommunications service, and so on. However, the clock frequenciesrequired by the wireless communications services are generallydifferent. When using multiple clock sources, each for a correspondingwireless communications service, in the mobile electronic device,battery power consumption is increased. Therefore, a method and anapparatus for controlling a main clock source shared between differentwireless communications modules is highly required to reduce batterypower consumption.

BRIEF SUMMARY OF THE INVENTION

Communications apparatuses and methods for controlling a clock sourceshared between different wireless communications modules are provided.An embodiment of a communications apparatus comprises a first wirelesscommunications module, a second wireless communications module and aclock source. The first wireless communications module provides a firstwireless communications service and communicates with a firstcommunications device in compliance with a first protocol. The secondwireless communications module provides a second wireless communicationsservice and communicates with a second communications device incompliance with a second protocol. The clock source is shared by thefirst and the second communications modules and provides a referenceclock to the first and the second communications modules. The firstwireless communications module detects a request from the secondwireless communications module for activating the clock source,determines whether the reference clock has been stably generated by theclock source, and adjusts an electrical characteristic of the clocksource to facilitate the reference clock output from the clock source toachieve a target frequency when the reference clock has not been stablygenerated.

An embodiment of a method executed by a first wireless communicationsmodule for controlling a clock source shared with at least a secondwireless communications module comprises: detecting a request from thesecond wireless communications module for activating the clock source;determining whether a reference clock has been stably generated by theclock source; and avoiding adjusting an electrical characteristic of theclock source when the reference clock has been stably generated, whereinthe adjustment to the electrical characteristic of the clock sourcefacilitates the reference clock output from the clock source to achievea target frequency.

Another embodiment of a communications apparatus comprises a clocksource providing a reference clock, a first wireless communicationsmodule comprising an interface and a micro controller unit coupled tothe interface, and a second wireless communications module. The secondwireless communications module notifies the first wirelesscommunications module that the clock source has been requested foractivating via the interface of the first wireless communicationsmodule. The micro controller unit detects the reference clock,determines whether to adjust an electrical characteristic of the clocksource to facilitate the reference clock to achieve a target frequencywith reference to the detected reference clock after receiving thenotification from the second wireless communications module, and adjuststhe electrical characteristic of the clock source in terms of thedetermination.

A detailed description is given in the following embodiments withreference to the accompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

The invention can be more fully understood by reading the subsequentdetailed description and examples with references made to theaccompanying drawings, wherein:

FIG. 1 shows a schematic diagram of a communications system according toan embodiment of the invention;

FIG. 2 shows a schematic diagram of a mobile electronic device accordingto a first embodiment of the invention;

FIG. 3 shows corresponding waveforms of the clock requests, CapID valuesand the provided reference clock in an exemplary situation;

FIG. 4 shows corresponding waveforms of the clock requests, CapID valuesand the provided reference clock in another exemplary situation;

FIG. 5 shows a schematic diagram of a mobile electronic device accordingto a second embodiment of the invention;

FIG. 6 shows the hardware architecture of a Bluetooth module accordingto an embodiment of the invention;

FIG. 7 shows the hardware architecture of a WiFi module according to anembodiment of the invention;

FIG. 8 shows the hardware architecture of a GPS module according to anembodiment of the invention;

FIG. 9 shows a schematic diagram of a mobile electronic device accordingto an embodiment of the invention;

FIG. 10A shows the flow chart of a method for controlling the VCXO bythe MCU of the first wireless communications module 101 according to anembodiment of the invention;

FIG. 10B shows an exemplary timeline for controlling the clock sourcewhen the VCXO is initially activated by an external wirelesscommunications module;

FIG. 11 shows a schematic diagram of a mobile electronic deviceaccording to another embodiment of the invention;

FIG. 12A shows the flow chart of a method for controlling the VCTCXO bythe MCU of the first wireless communications module 101 according to anembodiment of the invention;

FIG. 12B shows an exemplary timeline for controlling the clock sourcewhen the VCTCXO is initially activated by an external wirelesscommunications module; and

FIG. 13 shows a schematic diagram of a mobile electronic device 1300according to another embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

The following description is of the best-contemplated mode of carryingout the invention. This description is made for the purpose ofillustrating the general principles of the invention and should not betaken in a limiting sense. The scope of the invention is best determinedby reference to the appended claims.

FIG. 1 shows a schematic diagram of a communications system according toan embodiment of the invention. A mobile electronic device 100 may beinstalled in a notebook, a cellular phone, a portable gaming device, aportable multimedia player, a Global Positioning System (GPS), areceiver, or others. The mobile electronic device 100 may comprise aplurality of wireless communications modules 101 to 103, as shown inFIG. 1, to provide different wireless communications services. Thewireless communications module 101 may communicate with a wirelesscommunications device 201 in compliance with a specific protocol via theair interface. The wireless communications module 102 may communicatewith a wireless communications device 202 in compliance with a specificprotocol via the air interface. The wireless communications module 103may communicate with a wireless communications device 203 in compliancewith a specific protocol via the air interface. According to anembodiment of the invention, the wireless communications module 101 maybe, for example, a GSM (Global System for Mobile Communications), WCDMA(Wideband Code Division Multiple Access), cdma2000, WiMAX (WorldwideInteroperability for Microwave Access), TD-SCDMA (Time DivisionSynchronous Code Division Multiple Access), LTE (Long Term Evolution),TD-LTE (Time Division Long Term Evolution) module, or the like,providing wireless telephony services, such as basic services, shortmessage services (SMS), multimedia message services (MMS), supplementaryservices (SS), or others. The wireless communications module 102 or 103may be a Bluetooth, ZigBee, WiBREE (Wireless BREE), WiFi, UWB(Ultra-WideBand), or GPS (Global Positioning System) module, or others.

According to an embodiment of the invention, the mobile electronicdevice 100 may further comprise a clock source 104, shared between thewireless communications modules 101 to 103, to provide a reference clockCLOCK. The frequency of the reference clock CLOCK may be, for example,26 MHz, 15.36 MHz, 30.72 MHz, 32 MHz, or others. Note that those skilledin the art may also implement one or more than two wirelesscommunications modules to connect to the wireless communications module101 and share the clock source 104, and the invention should not belimited thereto. Additionally, it is to be understood that the wirelesscommunications modules may be integrated into an SoC (system on chip)and connect therebetween by internal wires, or different but similar busarchitectures, or others. Several embodiments for controlling the clocksource 104 shared between the wireless communications modules areproposed and discussed in the following paragraphs.

FIG. 2 shows a schematic diagram of a mobile electronic device 200according to a first embodiment of the invention. In the firstembodiment of the invention, the clock source 104 is controlled by onewireless communications module without coordinating with differentwireless communications modules 101 to 103. The clock source 104 maycomprise at least an oscillation source 141 and a clock generator 142 toprovide a clock signal as the reference clock CLOCK to differentwireless communications modules for operations thereof. As previouslydiscussed, the frequency of the reference clock CLOCK may be, forexample, 26 MHz, 15.36 MHz, 30.72 MHz, 32 MHz, or others. The threewireless communications modules 101 to 103 may operate at differentfrequencies when they are in a busy mode (also called a wake-up mode).Any of the wireless communications modules may issue a request toactivate the clock source 104 to provide the reference clock CLOCKthereto. According to an embodiment of the invention, the wirelesscommunications module 101 may issue an internal clock request toactivate the clock source 104 to provide the reference clock CLOCK whenthe wireless communications module 101 is going to enter or has entereda busy mode (also called a wake-up mode). According to anotherembodiment of the invention, the wireless communications module 101 mayfurther receive the external requests CLK_Req from the wirelesscommunications modules 102 and 103, collect the external requests by anOR gate 115, and output the collected result as the request CLK_Req_Outto the clock source 104. In the embodiments, the clock source 104 may beactivated and the oscillation source 141 may start to oscillate inresponse to the request CLK_Req_Out. Note that the OR gate 115 may alsobe replaced with any other circuit or device performing substantiallythe same functions or achieving substantially the same results, and theinvention should not be limited thereto.

As shown in FIG. 2, the wireless communications module 101 may comprisea micro controller unit (MCU) 111, an interrupt request controller (IRQcontroller) 113, an IO register module 117 and an external memoryinterface (EMI) bus 119. As one of ordinary skill in the art willreadily appreciate, the basic functions of the MCU, IRQ controller, IOregister and the EMI are already well-known in the art and are omittedhere for brevity. It is also to be understood that the MCU and relatedportions of a digital circuit are powered down to save battery powerwhen the reference clock is disabled (or inactivated). According to theembodiments of the invention, the clock source 104 may be a VCXO(voltage-controlled crystal oscillator), a VCTXO (voltage controlledtemperature compensated crystal oscillator), a DCXO (digitallycontrolled crystal oscillator), or others. The oscillation source 141may use the mechanical resonance of a vibrating crystal of piezoelectricmaterial to create an electrical signal with a precise frequency, andthe clock generator 142 may accordingly provide a stable clock signalfor digital integrated circuits of the wireless communications modules101 to 103 for synchronization, and/or stabilize frequencies for radiotransmitters and receivers installed in the wireless communicationsmodules 101 to 103.

According to the embodiment of the invention, the MCU 111 is capable ofadjusting certain electrical characteristic of the clock source 104,such as capacitance, voltage and the similar, via a control signalCLK_Ctrl to reduce power consumption and maintain reference clockfrequency with specific precision, or others. In the embodiments, thecapacitance of the clock source 104 may be adjusted to several levelsdenoted as “CapID values”. As an example, a relatively smallercapacitance value indicates that a relatively smaller capacitance isprovided so that the time required for the frequency of the referenceclock to reach the target reference clock frequency would be relativelyshort. However, in the first embodiment of the invention, severaldrawbacks may occur, as shown in FIG. 3 or FIG. 4, when the wirelesscommunications module 101 controls the clock source 104 withoutconsidering the operating statuses of the other wireless communicationsmodules 102 and 103.

FIG. 3 shows corresponding waveforms of the clock requests, variationsof CapID values and the provided reference clock in an exemplarysituation. After receiving the external clock request CLK_Req from thewireless communications module 102 or 103, the wireless communicationsmodule 101 may pass the clock request, via the OR gate 105 or a similarcircuit, to activate the clock source 104 to provide the reference clockCLOCK to the wireless communications module 102 or 103. Duringinitiation, a relatively smaller capacitance (for example, CapID=0) ofthe clock source 104 may cause the output reference clock to reach atarget frequency in a shorter time period than using a relatively largercapacitance. When the wireless communications module 101 wakes up andenters a busy mode, the clock source 101 may be started with thesmallest amount of capacitance (for example, CapID=0), until reachingthe target reference clock frequency (for example, 26 MHz). After that,the MCU 111 may adjust the capacitance to a calibrated level (forexample, CapID=42) to yield a better performance (for example, +/−0.1ppm clock drift). The mentioned adjustment to the capacitance of theclock source 101 may be referred to as a facilitating process to makethe frequency of reference clock to achieve a target level. However, inan exemplary situation, as the clock source 104 has already beenactivated to provide clock to the wireless communications module 102 or103 (e.g. a Bluetooth module), the capacitance adjustment triggered bythe MCU 111 may dramatically change the output reference clock frequencyto cause the operation of the second or the third wirelesscommunications module to fail. FIG. 4 shows corresponding waveforms ofthe clock requests, variations of CapID values and the providedreference clock in another exemplary situation. In this situation, theMCU 111 may maintain the capacitance of the clock source 104 with thecalibrated level (for example, CapID=42) without any further adjustmentsto avoid the mentioned problems. However, maintaining the capacitance ofthe clock source 104 consumes more battery power and may increase thetime required for the oscillator to reach the target reference clockfrequency. Therefore, a second embodiment of the invention is providedto solve the mentioned problems. Note that the first embodiment as shownin FIG. 2 and corresponding paragraphs are also a part of the inventiondeveloped during a design stage, and should not be regarded as theconventional technique.

FIG. 5 shows a schematic diagram of a mobile electronic device 500according to the second embodiment of the invention. In the secondembodiment of the invention, one wireless communications module controlsthe clock source 104 in a coordinated manner with consideration of theoperating statuses of the other wireless communications modules. Thefundamental hardware architecture and operation of the mobile electronicdevice 500 are similar to that of the mobile electronic device 200 shownin FIG. 2. Therefore, reference may be made to FIG. 2 with thecorresponding paragraphs and repeated descriptions are omitted here forbrevity. As illustrated previously, the wireless communications module101 may send out an internal clock request to activate the clock source104 to provide a reference clock, such as a 26 MHz, 15.36 MHz, 30.72MHz, 32 MHz clock, or others, when the wireless communications module101 is going to enter or has entered a busy mode. In order to facilitatecoordination between the three wireless communications modules 101 to103, the MCU 111 of the wireless communications module 101 may compriseone or more external interrupt (ENT) and/or general purpose input output(GPIO) connections to interface with the external wirelesscommunications modules 102 and 103. According to the second embodimentof the invention, when the wireless communications module 102 or 103wakes up and enters a busy mode, the wireless communications module 102or 103 may issue the external clock request CLK_Req to activate theclock source 104, as well as, trigger an external interrupt (EINT) viaan EINT interface or send a GPIO signal via a GPIO interface to notifythe MCU 111 of the wireless communications module 101 that the clocksource 104 has been requested for activating by another wirelesscommunications module. The requests CLK_Req are collected by an OR gate115 of the wireless communications module 101. The clock source 104 maybe activated and the oscillation source 141 may start to oscillate inresponse to the request CLK_Req_Out output by the OR gate 115. Note thatthe OR gate 115 may be controlled and activated by the MCU 111 when theMCU 111 receives the EINT or GPIO signal. The OR gate 115 may also bereplaced by any other circuit or device performing substantially thesame functions or achieving substantially the same results, and theinvention should not be limited thereto. Note also that the OR gate 115may be alternatively implemented outside of the wireless communicationmodules, and the invention should not be limited thereto.

According to an embodiment of the invention, once detecting an EINT, theinterrupt request (IRQ) controller 113 of the wireless communicationsmodule 101 may issue an IRQ to force the MCU 111 to load and execute anEINT handler containing a series of software codes. The executed EINThandler may adjust certain electrical characteristics of the main clocksource 104, such as capacitance, voltage and the similar, to reducepower consumption, maintain reference clock frequency, or others, atrelevant times. According to another embodiment of the invention, whendetecting a GPIO signal via the GPIO interface, a relevant bit of an JOregister 117 is set to indicate an asynchronous event triggered by thewireless communications module 102 or 103. The MCU 111 may periodicallypoll the bit of the JO register 117 to determine whether the clocksource 104 has been activated by another outside wireless communicationsmodule. If so, a software routine is loaded and executed to adjustcertain electrical characteristics of the clock source 104 at relevanttimes. The mentioned electrical characteristic adjustment of the clocksource 104 may refer to a calibrated capacitance value “CapID” stored inan NVRAM (non-volatile random access memory) 106 of the mobileelectronic device 500. Note that according to an embodiment of theinvention, the ENT handler or software routine may also be stored in theNVRAM 106. Detailed description of the electrical characteristicadjustment of the clock source 104 will be illustrated in the followingparagraphs.

FIG. 6 shows the hardware architecture of a Bluetooth module 600according to an embodiment of the invention. Bluetooth is an openwireless protocol for exchanging data over short distances from fixedand mobile devices, creating personal area networks. Bluetooth systemsoccupy a section of the 2.4 GHz Industrial, Scientific, and Medical(ISM) band, which is 83 MHz-wide. The Bluetooth module 600 may operateas a master device controlling a personal area network (PAN) and/oroperate as a slave device being wirelessly connected to the masterdevice. The Bluetooth module 600 uses an inquiry procedure to discovernearby devices, or to be discovered by devices in their locality. Theprocedure for forming connections is asymmetrical and requires that oneBluetooth device carries out a page (connection) procedure while theother Bluetooth device is connectable (page scanning.) The procedure istargeted, so that the page procedure is only responded to by onespecified Bluetooth device. The connectable device uses a specialphysical channel to listen for connection request packets from thepaging (connecting) device. This physical channel has attributes thatare specific to the connectable device, hence only a paging device withknowledge of the connectable device is able to communicate on thechannel. Both paging and connectable devices may already be connected toother Bluetooth devices in a piconet. Two types of connections may beused for communications between a master device and a slave device. Theyare SCO/eSCO (synchronous connection oriented/extended synchronousconnection oriented) links and ACL (asynchronous connection oriented)links. The execution of the above-mentioned and wireless datatransceiving procedures are performed using a radio frequency (RF)module 604 and a Bluetooth MODEM 601. The reference clock CLOCK outputfrom the clock source 104 is fed to an internal clock generator anddistributor 602 of the Bluetooth module 600. The internal clockgenerator and distributor 601 may adjust the reference clock CLOCK toappropriate clock rates and drive the adjusted clock signals over acertain power level to the Bluetooth MODEM 601, a VCO/PLL(voltage-controlled oscillator/phase lock loop) 605 in the circuit 604and a system control logic 603 for operations thereof. For example, theVCO/PLL 605 may utilize an adjusted clock signal of 26 MHz to stabilizefrequencies for radio transmitters and receivers. According to anembodiment of the invention, the internal clock generator anddistributor 602 may be regarded as a PLL frequency synthesizer operatingin a low frequency. The internal clock generator and distributor 602 mayoutput stable 64 MHz and 32 MHz clock signals to the Bluetooth MODEM 601and a system control logic 603, respectively for synchronizationtherebetween. The system control logic 603 issues the external clockrequest CLK_Req, as well as, an EINT or a GPIO signal to the wirelesscommunications module 101 when the Bluetooth module is going to enter orhas entered a busy mode.

FIG. 7 shows the hardware architecture of a WiFi module 700 according toan embodiment of the invention. The WiFi module 700, also called an IEEE802.11 module, a wireless local are network (WLAN) module, or others,may be wirelessly used to connect to the Internet to browse web pages,transceive e-mails, chat on-line, download and play multimedia content,or others. The WLAN is typically implemented as an extension to wiredLANs within a building and can provide the final few meters ofconnectivity between a wired network and mobile or fixed devices. MostWLAN systems may operate in the 2.4 GHz license-free frequency band andhave throughput rates of up to 2 Mbps. The WiFi module 700 connectsusers via an access point (AP) to the LAN. The AP typically receives,buffers, and transmits data between the WiFi module 700 and the wirednetwork infrastructure. Each AP may support, on average, twenty devicesand have a coverage varying from 20 meters in areas with obstacles(walls, stairways, elevators) and up to 100 meters in areas with clearlines of sight. The access process of the WiFi module 700 may involvethe following three steps: active/passive scanning, authentication andassociation performed via an RF module and a WiFi MODEM 701 thereof,enabling the WiFi module 700 to associate with an AP. Active scanning isused by the WiFi module 700 to scan surrounding wireless networks andlocate a compatible one. Passive scanning is used by the WiFi module 700to discover surrounding wireless networks by listening to beacon framesperiodically sent by an AP. To prevent illegal access of a wirelessnetwork, authentication may be needed between the WiFi module 700 and anaccess controller (AC) managing all APs in a WiFi or between the WiFiand the associated AP. When the WiFi module 700 chooses a compatiblenetwork with a specified SSID and authenticates to an AP, it sends anassociation request frame to the AP. The AP sends an associationresponse to the WiFi module 700 and adds the client's information to itsdatabase. An internal clock generator and distributor 702 of the WiFimodule 700 receives the reference clock CLOCK generated by the clocksource 104. The internal clock generator and distributor 702 may adjustthe reference clock CLOCK to appropriate clock rates and drive theadjusted clock signals over a certain power level to a WiFi MODEM 701, aVCO/PLL 705 in the circuit 704 and a system control logic 703 foroperations thereof. For example, the VCO/PLL 705 may utilize theadjusted clock signal of 26 MHz to stabilize frequencies for radiotransmitters and receivers. According to an embodiment of the invention,the internal clock generator and distributor 702 may be regarded as aPLL frequency synthesizer operating in a low frequency. The internalclock generator and distributor 702 may output stable 40 MHz clocksignals to both the WiFi MODEM 701 and a system control logic 703 forsynchronization therebetween. The system control logic 703 issues anexternal clock request CLK_Req, as well as, an EINT or a GPIO signal tothe wireless communications module 101 when the WiFi module 700 is goingto enter or has entered a busy mode.

FIG. 8 shows the hardware architecture of a GPS module 800 according toan embodiment of the invention. The GPS module 800 is capable ofdetermining the latitude and longitude of a receiver on earth bycalculating the time difference for GPS radio signals from different GPSsatellites to reach the receiver. Specifically, the GPS module 800calculates its position by measuring the distance between itself andthree or more GPS satellites. Measuring the time delay betweentransmission and reception of each GPS radio signal gives the distanceto each satellite, since the signal travels at a known speed. Thesignals also carry information about the satellites' location.Typically, by determining the position of, and distance to, at leastthree satellites, the GPS module 800 can compute its position usingtrilateration. An internal clock generator and distributor 802 of theGPS module 800 receive the reference clock generated by the main clocksource 104. The internal clock generator and distributor 802 may adjustthe reference clock CLOCK to appropriate clock rates and drive theadjusted clock signals over a specific power level to a GPS demodulator801, a VCO/PLL 805 in the circuit 804 and a system control logic 803 foroperations thereof. For example, the VCO/PLL 805 in the circuit 804 mayutilize the adjusted clock signal of 26 MHz to stabilize frequencies forradio receivers. According to an embodiment of the invention, theinternal clock generator and distributor 802 may be regarded as a PLLfrequency synthesizer operating in a low frequency. The internal clockgenerator and distributor 802 may output stable 130 MHz and 78.4 MHzclock signals to the GPS demodulator 801 and a system control logic 803,respectively for synchronization therebetween. The system control logic803 issues an external clock request CLK_Req, as well as, an EINT or aGPIO signal to the wireless communications module 101 when the GPSmodule 800 is going to enter or enters a busy mode.

As described previously, the clock source 104 may be a VCXO, a VCTXO, aDCXO, or others. In the following paragraphs, some embodiments forcontrolling a VCXO, a VCTXO and a DCXO will be introduced. FIG. 9 showsa schematic diagram of a mobile electronic device 900 according to anembodiment of the invention. In the embodiment of the invention, theclock source 904 may be implemented in a VCXO containing at least acrystal oscillator 941, a capacitance providing unit 942 and a clockprovider 943 with a VCO/PLL 944, as shown in the lower-left part of FIG.9. The frequency of the VCXO may be varied by only typically a few tensof parts per million (ppm), because the high Q factor of the crystaloscillator allows pulling over only a small range of frequencies. Thecapacitance providing unit 942 of the VCXO can be adjusted by theexecuted EINT handler or software routine of the wireless communicationsmodule 101 to provide a specific amount of capacitance. The capacitanceproviding unit 942 may contain multiple capacitors each controlled by avoltage, and the voltage may be adjusted according to the received CapIDvalue carried in the control signal CLK_Ctrl to provide a specificamount of capacitance. Alternatively, the capacitance providing unit 942may contain multiple capacitors with switching devices, and theswitching devices may be controlled according to the received CapIDvalue carried in the control signal CLK_Ctrl to provide a specificamount of capacitance. Related references for controlling thecapacitance providing unit 942 can be made to description of FIG. 2. TheEINT handler or software routine may further contain an automaticfrequency control (AFC) logic to adjust voltage (e.g. +/−0.1 ppm) to theVCO/PLL 944 of the VCXO 904 based on broadcasted signals from a basestation, such as the wireless communications device 201, ensuring thatprecision of the frequency of the output reference clock CLOCK can belimited to a small range. In an AFC procedure, the clock rate or phaseerror between the clocks of the base station and the wirelesscommunications module 101 are detected by the AFC logic. Thereafter, thevoltage to the VCO/PLL 944 is adjusted accordingly so as to compensatefor any frequency drift. Those skilled in the art may alternativelyarrange the AFC logic outside of the EINT handler or software routineand embed it in another periodic activated subroutine. It is to beunderstood that the adjustment command to the VCO/PLL 944 may also beconverted into a relevant voltage by a digital-to-analog converter (DAC)116.

FIG. 10A shows the flow chart of a method for controlling the VCXO bythe MCU 111 of the wireless communications module 101 according to anembodiment of the invention. After detecting a request to activate theclock source 904 from any external wireless communications module 102 or103 via the EINT or GPIO interface (Step S1001), the MCU 111 of thewireless communications module 101 determines whether the referenceclock has been stably generated or provided by the clock source 904(Step S1002). When the reference clock has not been stably generated orprovided by the clock source 904, meaning that the clock source has beeninitially activated by the external wireless communications module 102or 103 to provide the reference clock, the MCU 111 loads and executes acorresponding EINT handler or software routine, or others, which isstored in the NVRAM (Step S1003). Next, the MCU 111 adjusts anelectrical characteristic of the clock source 904 through the executedEINT handler or software routine by setting the CapID value to shortenthe clock settling time (Step 1004). As an example, the MCU 111 ofwireless communications module 101 may adjust the electricalcharacteristic of the clock source 904 by first adjusting a capacitanceof the clock source 904 to a relatively smaller level to shorten theclock settling time for a time interval, and then increasing thecapacitance of the clock source 904 to a target level to provide astable reverence clock. It is to be understood that the CapID value maybe carried in the control signals CLK_Ctrl or converted into a controlvoltage by the DAC to adjust the capacitance of the VCXO to a relevantlevel. When the reference clock has been stably generated or provided,meaning that the clock source has already provided a stable referenceclock to any other wireless communications module (i.e. any wirelesscommunications module other than the one that is making the request),the capacitance of the VCXO will not be changed and an AFC procedure maycontinue to maintain the reference clock with a specific precision untilall of the wireless communications modules leave the busy modes (StepS1005). It is to be understood that the reference clock has been stablygenerated when it is output with the designated frequency varied withina small range. In the AFC procedure, the voltage of the VCXO isperiodically adjusted based on broadcasted signals from a base station,ensuring that a frequency precision of the output reference clock can belimited to a small range. Next, the executed EINT handler or softwareroutine continuously monitors the statuses of all wirelesscommunications modules (Step S1006), and checks whether all wirelesscommunications modules are not in busy modes (Step S1007). When allwireless communications modules are not in busy modes, the clock source904 may be deactivated to save battery power (Step S1008). Otherwise,the process may loop back to step S1005 to re-execute the AFC procedure.

FIG. 10B shows an exemplary timeline for controlling the clock source904 when the VCXO is initially activated by an external wirelesscommunications module. The time period T1 is called a clock settlingtime period for loading and executing the EINT handler or softwareroutine, or other preparatory tasks. During the time period T2, theexecuted EINT handler or software routine controls capacitors of theVCXO. After the second time period T2, the reference clock has beenstably generated and the AFC procedure may be repeatedly executed tomaintain the output reference clock with a specific precision.

FIG. 11 shows a schematic diagram of a mobile electronic device 1100according to another embodiment of the invention. In the embodiment ofthe invention, the clock source 1104 may contain at least a VCTCXO 1141and a clock provider 1142, as shown in the lower-left part of FIG. 11.Other than the VCXO, the capacitance of VCTCXO 1141 is automaticallyadjusted and should not be changed by the wireless communications module101. Similarly, the voltage to the VCTCXO may be adjusted (e.g. +/−0.1ppm) by an executed EINT handler or software routine based onbroadcasted signals from a base station, ensuring that a frequencyprecision of the output reference clock can be limited to a small range.It is to be understood that the adjustment command to the VCTCXO 1141may be converted into a relevant voltage by a DAC 116.

FIG. 12A shows the flow chart of a method for controlling the VCTCXO bythe MCU 111 of the wireless communications module 101 according to anembodiment of the invention. After detecting a request to activate theclock source 1104 from any external wireless communications module 102or 103 via the EINT or GPIO interface (Step S1201), the MCU 111 of thewireless communications module 101 determines whether the referenceclock has been stably generated or provided by the clock source (StepS1202). When the reference clock has not been stably generated orprovided by the clock source 1104, meaning that the clock source 1104has been initially activated by the external wireless communicationsmodule 102 or 103 to provide the reference clock, the MCU 111 loads andexecutes a corresponding EINT handler or software routine, or others,which is stored in the NVRAM (Step S1203). When the reference clock hasbeen stably generated or provided, meaning that the clock source 1104has already provided a stable reference clock to any other wirelesscommunications module (i.e. any wireless communications module otherthan the one that is making the request), an AFC procedure may continueto maintain the reference clock with a specific precision until all ofthe wireless communications modules leave the busy modes (Step S1204).It is to be understood that the reference clock has been stablygenerated when it is output with a designated frequency varied within asmall range. In the AFC procedure, the voltage of the VCTCXO may beperiodically adjusted based on broadcasted signals from a base station,ensuring that frequency precision of the output reference clock can belimited to a small range. Next, the executed EINT handler or softwareroutine continuously monitors the statuses of all wirelesscommunications modules (Step S1205), and checks whether all wirelesscommunications modules are not in busy modes (Step S1206). When allwireless communications modules are not in busy modes, the clock source1104 may be deactivated to save battery power (Step S1207). Otherwise,the process may loop back to step S1204 to re-execute the AFC procedure.

FIG. 12B shows an exemplary timeline for controlling the clock source1104 when the VCTCXO is initially activated by an external wirelesscommunications module 102 or 103. The time period T3 is the clocksettling time period for loading and executing the EINT handler orsoftware routine, or other preparatory tasks. After the time period T3,the AFC procedure may be repeatedly executed to maintain the outputreference clock with a specific precision.

FIG. 13 shows a schematic diagram of a mobile electronic device 1300according to another embodiment of the invention. In the embodiment ofthe invention, the clock source 1304 may be implemented in a DCXOcomprising a crystal oscillator 1341, a capacitance providing unit 1342,a clock provider 1343, a VCO/PLL 1344, and further comprising a digitalinterface and a DAC 1345 as shown in the lower-left part of FIG. 13. Thedigital interface receives digital commands from the MCU 111, and feedsthem to the DAC 1345 to be converted into voltage for an AFC logic. Theflow chart of the method for controlling the DCXO by the MCU 111 may befound in FIG. 10A, and the exemplary timeline when the DCXO is initiallyactivated by an external wireless communications module may be found inFIG. 10B.

While the invention has been described by way of example and in terms ofpreferred embodiment, it is to be understood that the invention is notlimited thereto. Those who are skilled in this technology can still makevarious alterations and modifications without departing from the scopeand spirit of this invention. Therefore, the scope of the presentinvention shall be defined and protected by the following claims andtheir equivalents.

1. A communications apparatus, comprising: a first wirelesscommunications module providing a first wireless communications serviceand communicating with a first communications device in compliance witha first protocol; a second wireless communications module providing asecond wireless communications service and communicating with a secondcommunications device in compliance with a second protocol; and a clocksource shared by the first and the second communications modules andproviding a reference clock to the first and the second communicationsmodules, wherein the first wireless communications module detects arequest from the second wireless communications module for activatingthe clock source, determines whether the reference clock has been stablygenerated by the clock source, and adjusts an electrical characteristicof the clock source to facilitate the reference clock output from theclock source to achieve a target frequency when the reference clock hasnot been stably generated.
 2. The communications apparatus as claimed inclaim 1, wherein the first wireless communications module avoidsadjusting the electrical characteristic of the clock source when thereference clock has been stably generated.
 3. The communicationsapparatus as claimed in claim 1, wherein a frequency of the referenceclock is varied with the electrical characteristic of the clock source.4. The communications apparatus as claimed in claim 1, wherein theelectrical characteristic is a capacitance and/or a voltage of the clocksource.
 5. The communications apparatus as claimed in claim 2, whereinwhen the reference clock has been stably generated, the first wirelesscommunications module maintains the reference clock with a specificprecision by adjusting a voltage applied to a voltage controlledoscillator (VCO) or a phase locked loop (PLL) of the clock source basedon broadcasted signals received from the first communications device. 6.The communications apparatus as claimed in claim 1, wherein the firstwireless communications module comprises one or more external interrupt(EINT) and/or general purpose input output (GPIO) connections tointerface with the second wireless communications module.
 7. Thecommunications apparatus as claimed in claim 6, wherein the secondwireless communications module issues the request by triggering anexternal interrupt (EINT) via the EINT interface or sending a GPIOsignal via the GPIO interface to notify the first wirelesscommunications module that the clock source has been requested foractivating.
 8. The communications apparatus as claimed in claim 6,wherein the first wireless communications module further loads andexecutes an EINT handler or a software routine containing a series ofsoftware codes, and adjusts the electrical characteristic of the clocksource through the executed EINT handler or software routine.
 9. Thecommunications apparatus as claimed in claim 1, wherein the firstwireless communications module adjusts the electrical characteristic ofthe clock source by adjusting a capacitance of the clock source to arelatively smaller value for a first time interval so as to reduce timefor achieving the target frequency, and then adjusting the capacitanceof the clock source to a relatively larger value for a second timeinterval so as to maintain the target frequency with a predeterminedprecision.
 10. The communications apparatus as claimed in claim 1,wherein the second wireless communications module comprises an internalclock generator and distributor receiving the reference clock andadjusting the reference clock to appropriate clock rates required by thesecond wireless communications module.
 11. A method executed by a firstwireless communications module for controlling a clock source sharedwith at least a second wireless communications module comprising:detecting a request from the second wireless communications module foractivating the clock source; determining whether a reference clock hasbeen stably generated by the clock source; and avoiding adjusting anelectrical characteristic of the clock source when the reference clockhas been stably generated, wherein the adjustment to the electricalcharacteristic of the clock source facilitates the reference clockoutput from the clock source to achieve a target frequency.
 12. Themethod as claimed in claim 11, further comprising: adjusting theelectrical characteristic of the clock source to make the referenceclock output from the clock source to achieve the target frequency whenthe reference clock has not been stably generated.
 13. The method asclaimed in claim 11, wherein a frequency of the reference clock isvaried with the electrical characteristic of the clock source.
 14. Themethod as claimed in claim 11, wherein the electrical characteristic isa capacitance and/or a voltage of the clock source.
 15. The method asclaimed in claim 12, further comprising: adjusting a voltage applied toa voltage controlled oscillator (VCO) or a phase locked loop (PLL) ofthe clock source based on broadcasted signals received from a firstcommunications device communicating with the first wirelesscommunications module to maintain the reference clock with a specificprecision when the reference clock has been stably generated.
 16. Themethod as claimed in claim 11, further comprising: issuing the requestby triggering an external interrupt (EINT) or sending a GPIO signal tonotify the first wireless communications module that the clock sourcehas been requested for activating.
 17. The method as claimed in claim16, further comprising: loading and executing an EINT handler or asoftware routine containing a series of software codes when receivingthe external interrupt or the GPIO signal; and adjusting the electricalcharacteristic of the clock source through the executed EINT handler orsoftware routine.
 18. The method as claimed in claim 11, whereinadjusting the electrical characteristic of the clock source furthercomprises: adjusting a capacitance of the clock source to a relativelysmaller value for a first time interval so as to reduce time forachieving the target frequency; and adjusting the capacitance of theclock source to a relatively larger value for a second time interval soas to maintain the target frequency with a predetermined precision. 19.A communications apparatus, comprising: a clock source providing areference clock; a first wireless communications module comprising: aninterface; and a micro controller unit coupled to the interface; and asecond wireless communications module notifying the first wirelesscommunications module that the clock source has been requested foractivating via the interface of the first wireless communicationsmodule, wherein the micro controller unit detects the reference clock,determines whether to adjust an electrical characteristic of the clocksource to facilitate the reference clock to achieve a target frequencywith reference to the detected reference clock after receiving thenotification from the second wireless communications module, and adjuststhe electrical characteristic of the clock source in terms of thedetermination.
 20. The communications apparatus as claimed in claim 19,wherein the micro controller unit further determines to adjust acapacitance of the clock source to facilitate the reference clock toachieve the target frequency when the reference clock has not beenstably generated.
 21. The communications apparatus as claimed in claim19, wherein the micro controller unit further determines not to adjust acapacitance of the clock source when the reference clock has been stablygenerated, in which the adjustment to the capacitance facilitates thereference clock to achieve the target frequency.